<link rel="stylesheet" type="text/css" href="/Css/uploadify.css">
<script src="/Js/jquery.uploadify.js" type="text/javascript"></script>
<script src="/ckeditor/ckeditor.js" type="text/javascript"></script>

 <div class="pad-10">
 
 	<div class="navigate">
		<h1>商品添加</h1>
		<a class="button fr" href="/index.php/Admin/Goods/">商品列表</a>
  	</div>
  	
  	
    <div class="col-tab">
      <ul class="tabBut cu-li">
        <li id="tab_setting_1" class="on" onclick="SwapTab('setting','on','',2,1);">商品添加</li>
      </ul>
      <div id="div_setting_1" class="contentList pad-10">
        <table width="100%" cellpadding="2" cellspacing="1" class="table_form">
        <tr>
            <th>商品分类：</th>
            <td>
				<select name="cate_id" id="cate_id" style="width:150px;">
					<option value="0" selected="selected">--顶级分类--</option>
					<volist name="cates" id="c">
					<option value="{$c.id}">{$c.name}</option>
					</volist>
            	</select>
            </td>
          </tr>
          <tr> 
            <th width="100">商品名称 :</th>
            <td><input type="text" name="name" id="name" class="input-text" style="width:300px;"></td>
          </tr>
          <tr> 
            <th width="100">商品英文名称 :</th>
            <td><input type="text" name="ename" id="ename" class="input-text" style="width:300px;"></td>
          </tr>
          <tr> 
            <th width="100">简单描述 :</th>
            <td>
            	<textarea id="describe" cols="80" rows="2"></textarea>
            </td>
          </tr>
		  <tr>
			<th width="100">英文简单描述 :</th>
		    <td>
				<textarea id="edescribe" cols="80" rows="2"></textarea>
		  	</td>
		  </tr>
		  <tr>
		  	<th width="100">产品故事 :</th>
			<td>
				<textarea id="story" cols="80" rows="2"></textarea>
			</td>
		  </tr>
          <tr> 
            <th width="100">商品详情:</th>
            <td>
            
            	<textarea id="detail" cols="80" rows="10"></textarea>
            	<script type="text/javascript">
				var editor = CKEDITOR.replace( 'detail',
					    {
			        toolbar : 'Full',
			        uiColor : '#9AB8F3'
			    });
			    
				</script>
            </td>
          </tr>
		  <tr>
		  	<th width="100">温馨提示 :</th>
			<td>
				<textarea id="tips" name="tips" cols="80" rows="2"></textarea>
			</td>
		  </tr>
		  <tr>
				<th width="100">商品单价:</th>
				<td><input type="text" id="price" name="price" /></td>
		  </tr>
		  <tr>
				<th width="100">数量单位:</th>
				<td><input type="text" id="unit" name="unit" title="例如:1个，1套，1瓶" /></td>
		  </tr>
          <tr>
            <th width="100">排序值 :</th>
            <td><input type="text" name="ord" id="ord" class="input-text" size="4" onkeyup="this.value=this.value.replace(/\D/g,'')" onafterpaste="this.value=this.value.replace(/\D/g,'')"></td>
          </tr>

		  <tr>
			<th width="100">产品推荐:</th>
			<td>
				<input type="radio" id="is_recommend_0" name="is_recommend" value="0" checked="checked" /> 
				<label for="is_recommend_0">否</label> 
				<input type="radio" id="is_recommend_1" name="is_recommend" value="1" <eq name="goods.is_commend" value="1"> checked="checked"</eq> /> 
				<label for="is_recommend_1">是</label>
			</td>
		</tr>
		<tr>
			<th width="100">明星产品:</th>
			<td>
				<input type="radio" id="is_star_0" name="is_star" value="0" checked="checked" /> 
				<label for="is_star_0">否</label> 
				<input type="radio" id="is_star_1" name="is_star" value="1" /> 
				<label for="is_star_1">是</label>
			</td>
		</tr>
		<tr>
			<th width="100">购物车选购:</th>
			<td>
				<input type="radio" id="is_cart_0" name="is_cart" value="0" checked="checked" /> 
				<label for="is_cart_0">否</label> 
				<input type="radio" id="is_cart_1" name="is_cart" value="1" /> 
				<label for="is_cart_1">是</label>
			</td>
		</tr>
		<tr>
			<th width="100">产品推荐:</th>
			<td>
			
				<input type="checkbox" id="is_hot" name="is_hot" value="is_hot" /> 
				<label for="is_hot">热卖</label> 
				
				<input type="checkbox" id="is_birth" name="is_children" value="is_children" /> 
				<label for="is_children">儿童</label>
				
				<input type="checkbox" id="is_birth" name="is_birth" value="is_birth" /> 
				<label for="is_birth">生日</label>
				
				<input type="checkbox" id="is_lover" name="is_lover" value="is_lover" /> 
				<label for="is_lover">情人节</label>
				
				
				<input type="checkbox" id="is_party" name="is_party" value="is_party" /> 
				<label for="is_party">聚会</label>
				
				
				<input type="checkbox" id="is_afternoon_tea" name="is_afternoon_tea" value="is_afternoon_tea" /> 
				<label for="is_afternoon_tea">下午茶</label>
				
				
				<input type="checkbox" id="is_wedding" name="is_wedding" value="is_wedding" /> 
				<label for="is_wedding">婚礼</label>
				
				
				<input type="checkbox" id="is_celebration" name="is_celebration" value="is_celebration" /> 
				<label for="is_celebration">宴会庆典</label>
				
			</td>
		</tr>
        </table>
      </div>
    
      <div class="bk15"></div>
      <div class="btn">
      	<input type="button" value="添加" name="submit" class="button" id="btnAdd">
      </div>
    </div>
  </div>

<input id="image" name="image" type="hidden" value="0">

<script type="text/javascript">
		
		$(function() {
			$('#file_upload').uploadify({
				'formData'     : {
					'timestamp' : '{$time}',
					'token'     : '{$token}'
					
				},
				'swf'      : '/Img/upload/uploadify.swf',
				'uploader' : '/index.php/Admin/Goods/image_upload',
				'onUploadComplete' : function(file) {
					alert('The file ' + file.name + ' finished processing.');
				}
			});
		});
</script>
<script type="text/javascript" src="/Js/adm/goods/add.js"></script>